package com.gzx.qc.modular.inspection.controller;

import com.alibaba.fastjson.JSON;
import com.gzx.qc.modular.inspection.bo.GzxManualQualityInspectionAddBo;
import com.gzx.qc.modular.inspection.bo.GzxManualQualityInspectionQueryBo;
import com.gzx.qc.modular.inspection.service.GzxManualQualityInspectionService;
import com.gzx.qc.modular.inspection.vo.GzxManualQualityInspectionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.mvc.controller.BaseController;

import java.util.List;

/**
 * @author xbl
 */
@Slf4j
@RestController
@RequestMapping("/feign/qc")
public class GzxFeignQcInspectionController extends BaseController<GzxManualQualityInspectionAddBo, GzxManualQualityInspectionVo, GzxManualQualityInspectionQueryBo, GzxManualQualityInspectionService> {

    public GzxFeignQcInspectionController(GzxManualQualityInspectionService baseService) {
        super(baseService);
    }

    /**
     * 批量获取质检信息(Feign用)
     */
    @PostMapping("/getStatusList")
    public String getStatusList(@RequestBody List<String> callIds) {
        log.info("批量获取质检信息 {} ", callIds);
        return JSON.toJSONString(baseService.getStatusList(callIds));
    }

}
